* lread.c (hash_string): Use size_t, not int, for hash computation.
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 28 Apr 2011 05:15:35 +0000 (22:15 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 28 Apr 2011 05:15:35 +0000 (22:15 -0700)
commite8f098ff32f1018d114c11710d9a87ce1108f438
treec1fc0d10a2007d8693de5e52d7ca76978108c4e4
parent34bba0bda1aff54a918a5bfc9c5798e5deeaee38
* lread.c (hash_string): Use size_t, not int, for hash computation.

Normally we prefer signed values; but hashing is special, because
it's better to use unsigned division on hash table sizes so that
the remainder is nonnegative.  Also, size_t is the natural width
for hashing into memory.  The previous code used 'int', which doesn't
retain enough info to hash well into very large tables.
(oblookup, oblookup_last_bucket_number, Funintern): Likewise.
src/ChangeLog
src/lread.c